import request  from "@/utils/request.js"

export const shicilistServer = (params) =>{
    return request.get('/manager/shicilist',{params:params})
}

export const addshiciServer = (addData) =>{
    const params = new URLSearchParams();
    for (let key in addData){
          params.append(key,addData[key]);
    }
    return request.post('/manager/addshici',params)
}

export const updatashiciServer = (addData) =>{
    const params = new URLSearchParams();
    for (let key in addData){
          params.append(key,addData[key]);
    }
    return request.put('/manager/updateshici',params)
}

export const delshiciServer = (addId) =>{
    return request.delete('/manager/delshici/'+addId)
}
 
export const findshici2 = (title) => {
    return request.get('/shici/find/'+title)
}

export const findshiciname = (title) => {
    return request.get('/shici/find/name/'+title)
}

export const findshicicontent = (title) => {
    return request.get('/shici/find/content/'+title)
}

export const useradd = (addData) =>{
    const params = new URLSearchParams();
    for (let key in addData){
          params.append(key,addData[key]);
    }
    return request.post('/shici/usershiciadd',params)
}